package com.it.you.base.list;

import com.sun.tools.javac.util.List;

import java.util.ArrayList;

public class ListTest3 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);

        list.remove(0);

        ArrayList<Integer> ids = new ArrayList<>();
        List<Integer> resource = List.of(1, 2, 3, 4, 5, 1);
        resource.forEach(i ->{
            if (!ids.contains(i)) {
                ids.add(i);
            }
        });
        System.out.println(ids);
    }
}
